<template>
	<view class="content">
		<view class="user">
			<view class="user-avater-container">
				<image :src="avaterUrl" class="user-avater">	
				</image>
			</view>
			<view class="user-nickname">
				{{nickname}}
			</view>
		</view>
		<view class="submit">
			<view>	
				<button class="button" 
					type="primary" @tap='submit()'>登录管理员界面</button>
			</view>
		</view>
	</view>
</template>

<script>
	var _self;
	export default {
		data() {
			return {
				avaterUrl:"",
				nickname:"",
				
			}
		},
		mounted() {
			uni.getStorage({
				key:'avater',
				success: res => {
					this.avaterUrl = res.data
					console.log(this.avaterUrl)
				}
			})
			uni.getStorage({
				key:'nickname',
				success: res => {
					this.nickname = res.data
					console.log(this.nickname)
				}
			})	
		},
		methods: {
			// getUserInfo(){
			// 	uni.showLoading({
			// 		title:'加载中'
			// 	});
			// 	uni.getUserProfile({
			// 		desc: "获取你的昵称、头像、地区及性别",
			// 		success:(obj) => {
			// 			console.log(obj)
			// 			this.avatarUrl = obj.userInfo.avatarUrl;
			// 			this.nickName = obj.userInfo.nickName;
			// 		},
			// 		fail:res=>{
			// 			console.log(res)
			// 		},
			// 		complete() {
			// 			uni.hideLoading()
			// 		}
			// 	})
			// },
			submit(){
				this.$https({
					url:this.baseUrl + '',
					method:'POST',
					success : (res) =>{
						console.log(res.data.data)
					}
					
				})
			}
		}
	}
</script>

<style>
@import './loginInfo.css';
</style>
